<template>
    <div>
        <div class="example-btn" @click="showMsg">打开msgBox</div>
        <msgBox ref="msgBox"></msgBox>
    </div>
</template>
<script>
import msgBox from '@/components/MsgBox'
export default {
    components: {
     msgBox
  },
  methods:{
      showMsg(){
          this.$refs.msgBox.show('请输入正确的uid', {
          type: 'alert',
          confirmText: '确定',
          titleText: '温馨提示',
        });
      }
  }
}
</script>

<style lang="less" scoped>
.example-btn{
    text-align: center;
    font-size: 0.8rem;
    padding: 0.1rem;
    background-color: white;
    width: 6rem;
}
</style>

